<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
	<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
	<META HTTP-EQUIV="Expires" CONTENT="0">
	<title>cti</title>
	<link href="__ADMIN__/lib/qimo/css/cti.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="__ADMIN__/lib/qimo/js/jq/jquery.js"></script>
	<script type="text/javascript" src="__ADMIN__/lib/qimo/moor/moor.js" djConfig="isDebug:false, parseOnLoad:false"></script>
	<script type="text/javascript" src="__ADMIN__/lib/qimo/js/m7Util.js"></script>
	<script type="text/javascript" src="__ADMIN__/lib/qimo/js/moortools.js"></script>
	<script type="text/javascript" src="__ADMIN__/lib/qimo/js/m7PhoneBar.js"></script>
	<script type="text/javascript" src="__ADMIN__/lib/qimo/js/objectDeclare.js"></script>
</head>
<body>
<div id="softphonebar" style="position: relative;">
    <div class="mrg5" id="peerStatus">
        <a href="#" onclick="javascript:phone.m7SetBusy(false,'0')" id="IdleDisable" class="IdleDisable userStatus" style="color: #53d466;">
			<span class="ponit" style="background-color: #53d466;"></span>空闲
            <span class="line"></span>
        </a>
        <a href="#" onclick="javascript:phone.m7SetBusy(true,'2')" id="RestDisable" class="RestDisable userStatus">
			<span class="ponit"></span>小休
            <span class="line"></span>
        </a>
        <a href="#" onclick="javascript:phone.m7SetBusy(true,'1')" id="BusyDisable" class="BusyDisable userStatus">
			<span class="ponit"></span>忙碌
		</a>
        <span class="softphone_timer">
            <span id="softphonebar.peerState" style="margin-left: 10px"></span>
            <span id="softphonebar.peerTimeState" class="peerTimeState">00:00:00</span>
        </span>
	</div>
	<div class="mrg5" id="callStatus">
		<input type="text" id="moorCall-dialout-input" placeholder="输入手机号" value=""
			   onKeyDown="if(event.keyCode == 13){softphoneBar.dialout(m7$('#moorCall-dialout-input').val())}" class="ipt fl" />
		<ul id="callStatusList">
			<li>
				<a href="#" class="DialEnable" id="DialEnable"
                   onclick="softphoneBar.dialout(m7$('#moorCall-dialout-input').val())">外呼
                    <span class="icon outcallIcon"></span>
                </a>
                <a href="#" class="DialDisable disable" id="DialDisable" style="display: none">外呼
                    <span class="icon outcallIcon"></span>
                </a>
            </li>
			<li>
                <a href="#" class="HangupEnable" id="HangupEnable" style="display: none"
                   onClick="javascript:phone.hangup()">挂机
                    <span class="icon handupIcon"></span>
                </a>
                <a href="#" class="HangupDisable disable" id="HangupDisable">挂机
                    <span class="icon handupIcon"></span>
                </a>
			</li>
			<li>
                <a href="#" class="HoldEnable" id="HoldEnable" style="display: none"
                   onClick="phone.hold();">保持
                    <span class="icon holdIcon"></span>
                </a>
                <a href="#" class="HoldDisable disable" id="HoldDisable">保持
                    <span class="icon holdIcon"></span>
                </a>
                <a href="#" class="HoldGetEnable" id="HoldGetEnable" style="display: none"
                   onClick="phone.unhold();">继续
                    <span class="icon holdIcon"></span>
                </a>
			</li>
			<li>
                <a href="#" class="TransferEnable" id="TransferEnable" style="display: none"
                   onClick="javascript:softphoneBar.m7ToTransfer();">
                    转移<span class="icon transferIcon"></span>
                </a>
                <a href="#" class="TransferDisable disable" id="TransferDisable">
                    转移<span class="icon transferIcon"></span>
                </a>
                <a href="#" class="TransferEnable" id="ConsultTransferEnable" style="display: none"
                   onclick="javascript:phone.transfer('9333333','external', {})">
                    转移<span class="icon transferIcon"></span>
                </a>
                <a href="#" class="TransferDisable" id="ConsultTransferDisable" style="display: none">
                    转移<span class="icon transferIcon"></span>
                </a>
			</li>
			<li>
                <a href="#" class="ConsultEnable" id="ConsultEnable" style="display: none"
                   onclick="javascript:softphoneBar.m7ToConsult();">
                    咨询<span class="icon webchatIcon"></span>
                </a>
                <a href="#" class="ConsultDisable disable" id="ConsultDisable" >
                    咨询<span class="icon webchatIcon"></span>
                </a>
			</li>
			<li>
				<a href="#" class="StopConsultEnable disable" id="StopConsultDisable" style="width: 102px">
					结束咨询<span class="icon webchatIcon"></span>
				</a>
				<a href="#" class="StopConsultEnable" id="StopConsultEnable" style="width: 102px;display:none;"
			     	onclick="javascript:phone.stopConsult();">
					结束咨询<span class="icon webchatIcon"></span>
				</a>
			</li>
			<li>
                <a href="#" class="ThreeWayCallEnable" id="ThreeWayCallEnable" style="display: none;width: 102px"
                   onclick="javascript:softphoneBar.toThreeWayCall();">
                    三方通话<span class="icon threeWaycall"></span>
                </a>
                <a href="#" class="ThreeWayCallDisable disable" id="ThreeWayCallDisable" style="width: 102px">
                    三方通话<span class="icon threeWaycall"></span>
                </a>

                <a href="#" class="ThreeWayCallEnable" id="ConsultThreeWayCallEnable" style="display: none;width: 102px"
                   onclick="javascript:phone.threeWayCall('9333333')">
                    三方通话<span class="icon threeWaycall"></span>
                </a>
                <a href="#" class="ThreeWayCallDisable" id="ConsultThreeWayCallDisable" style="display: none;width: 102px">
                    三方通话<span class="icon threeWaycall"></span>
                </a>
            </a>
			</li>
            <li>
                <a href="#" class="StopConsultEnable disable" id="transferIVR" style="width: 110px">
                    转IVR菜单<span class="icon transferIcon"></span>
                </a>
                <a href="#" class="StopConsultEnable" id="transferIVREnable" style="width: 110px;display:none;"
                   onclick="javascript:phone.m7Phone_toMenu('');">
                    转IVR菜单<span class="icon transferIcon"></span>
                </a>
            </li>
            <li>
                <a href="#" class="transferSatisfaction disable" id="transferSatisfaction" style="width: 130px">
                    转满意度评价<span class="icon transferSatisfactionIcon"></span>
                </a>
                <a href="#" class="transferSatisfaction" id="transferSatisfactionEnable" style="width: 130px;display:none;"
                   onclick="javascript:phone.investigate();">
                    转满意度评价<span class="icon transferSatisfactionIcon"></span>
                </a>
            </li>
		</ul>
	</div>
</div>
<div id="netMessage"></div>
<iframe id="moorCall.iframe" style="display: none"></iframe>
</body>
<script type="text/javascript">
    var m7$=$.noConflict()
    var qimoproxy_url="{:config('qimoproxy_url')}";
    m7$(window).load(function(){
        var loginName = moorCall.moortools.m7getUrlVal("loginName");
        var password = moorCall.moortools.m7getUrlVal("password");
        var loginType = moorCall.moortools.m7getUrlVal("loginType");
        var agentStatus = moorCall.moortools.m7getUrlVal("agentStatus");
        if(loginType != "") {
            extenType = loginType;
        }
        if (agentStatus === '0') {
            m7$("#IdleDisable").css("color", "#53d466")
            m7$("#IdleDisable").find("span").css("background-color", "#53d466")
            m7$("#BusyDisable").css("color", "#8a8a8a")
            m7$("#BusyDisable").find("span").css("background-color", "#8a8a8a")
            m7$('.peerTimeState').css("color", "#53d466")
        } else {
            m7$("#IdleDisable").css("color", "#8a8a8a")
            m7$("#IdleDisable").find("span").css("background-color", "#8a8a8a")
            m7$("#BusyDisable").css("color", "#ff7a72")
            m7$("#BusyDisable").find("span").css("background-color", "#ff7a72")
            m7$('.peerTimeState').css("color", "#ff7a72")
        }
        moorCall.moortools.m7BeginLogon(loginName, password, extenType, agentStatus);
    });
</script>
</html>